package com.guigu.pd.oms.service.impl;

import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author lizongyi
 * @date 2022/7/25
 * @Note 项目启动时加载最新规则
 */
@Component
//@Service
public class CommandLineRunnerImpl implements CommandLineRunner {


    @Resource
    private ReloadDroolsRulesService rules;


    @Override
    public void run(String... args) throws Exception {
        rules.reload();
    }

    }

